package com.shenmazong.demo1907amongo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author 军哥
 * @version 1.0
 * @description: TODO
 * @date 2021/12/10 17:18
 */

@Data
@TableName(value = "tb_blog")
@Document(indexName = "tb_blog", shards = 1, replicas = 1)
public class TbBlog {

    @TableId(value = "blog_id", type = IdType.AUTO)
    @Id
    private Integer blogId;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String blogTitle;

    private Integer userId;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String blogContext;

    private Integer blogShare;

    @Field(type = FieldType.Keyword)
    private String imageName;

    private Integer esFlag;
}
